<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@include file="/common/common.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("basepath", basePath);
	
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="/common/commoncss.jsp"></jsp:include>
<script type="text/javascript" src="js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/custom/zh_CN/main.js"></script>
<link type="text/css" href="js/calendar/css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/calendar/zh_CN/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/calendar/zh_CN/timepicker.js"></script>
<script type="text/javascript" src="js/custom/common.js"></script>
<script language="javascript">
/**页面加载的时候，初始化时间控件**/
$(function() {
	dateval("eff",true);
	dateval("exp", true);
	dateval("datemonth", false);
	});


function CheckForm(){
		var ip = document.getElementById("ip");	
		var port = document.getElementById("port");
		var dbservername = document.getElementById("dbservername");	
		var username = document.getElementById("username");
		var password = document.getElementById("password");
		var type = document.getElementById("type");	
		var dbname = document.getElementById("dbname");
		var eff = document.getElementById("eff");	
		var exp = document.getElementById("exp");
		var dbslongname=document.getElementById("dbslongname");
		if(trim(ip.value) == ""){
			alert("IP必须填写");
			return false;
		}
		 if(trim(port.value)==""){
			alert("端口必须填写");
			return false;
		} 
		if(trim(dbservername.value) == ""){
			alert("服务器名称必须填写");
			return false;
		}
		if(trim(dbslongname.value)==""){
			alert("远程服务器名称必须填写");
			return false;
			
		}
		if(trim(username.value)==""){
			alert("用户名必须填写");
			return false;
		} 
		if(trim(password.value)==""){
			alert("密码必须填写");
			return false;
		} 
		if(trim(type.value) == ""){
			alert("类型填写");
			return false;
		}
		if(trim(dbname.value)==""){
			alert("数据库名称必须填写");
			return false;
		}
		if(trim(eff.value)==""){
			alert("生效期必须填写");
			return false;
		} 
		if(trim(exp.value) == ""){
			alert("失效期必须填写");
			return false;
		}
		return true;
	}
</script>
</HEAD>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" style="border:0;overflow-x:hidden;background-color:#EFEFEF;">
<div class="byt_table" style="width:98.3%;height:580px;overflow:auto;margin-top:0px;">
<form name="Form1" id="Form1" action="DBManagePlatFormAction!DbInfoAdd_OK" method="post" onSubmit="return CheckForm();">
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
			<th colspan="2" >数据库信息管理前台(新增)</th>
		</tr>
	</thead>
  	  <tr>
        <th width="37%">IP： </th>
        <td width="63%" ><input type="text" name="ip" id="ip" value=""/><span class="flag_red">*</span></td>
      </tr>
      <tr>
        <th width="37%">端口： </th>
         <td><input type="text" name="port" id="port" value=""/><span class="flag_red">*</span></td>
      </tr>
      <tr>
        <th width="37%">数据库服务器名称： </th>
        <td width="63%" ><input type="text" name="dbservername" id="dbservername" value="" /><span class="flag_red">*</span></td>
      </tr>
      <tr>
        <th width="37%">远程服务器名称： </th>
        <td width="63%" ><input type="text" name="dbslongname" id="dbslongname" value="" /><span class="flag_red">*</span></td>
      </tr>
      <tr>
        <th width="37%">用户名： </th>
        <td width="63%" ><input type="text" name="username" id="username" value="" /><span class="flag_red">*</span></td>
      </tr>
      <tr>
        <th width="37%">密码： </th>
        <td width="63%" ><input type="text" name="password" id="password" value=""/><span class="flag_red">*</span></td>
      </tr>
      <tr>
        <th width="37%">数据库类型： </th>
        <td width="63%" ><input type="text" name="type" id="type" value=""/><span class="flag_red">*</span></td>
      </tr>
      <tr>
        <th width="37%">月库月份： </th>
        <td width="63%" ><input name="datemonth" type="text" id="datemonth" class="class_input_" size="21" value="" readonly /></td>
      </tr>
      <tr>
        <th width="37%">数据库名称： </th>
        <td width="63%" ><input type="text" name="dbname" id="dbname" value=""/><span class="flag_red">*</span></td>
      </tr>
      <tr>
        <th width="37%">备注： </th>
        <td width="63%" ><input type="text" name="remark" id="remark" value=""/></td>
      </tr>
      <tr>
        <th width="37%">操作人： </th>
        <td width="63%" ><input type="text" name="oprtname" id="oprtname" value=""/></td>
      </tr>
      <tr>
        <th width="37%">生效日期： </th>
        <td width="63%" ><input name="eff" type="text" id="eff" class="class_input_" size="21" value="" readonly /><span class="flag_red">*</span></td>
      </tr>
      <tr>
        <th width="37%">时效日期： </th>
        <td width="63%" ><input name="exp" type="text" id="exp" class="class_input_" size="21" value="" readonly /><span class="flag_red">*</span></td>
      </tr>
</table>
<div class="button_center"> 
		<input type="submit"  name="Submit" value="保存"/>
        <input type="button"  value="返回" onclick="javascript:window.history.go(-1)"/>
</div>
</form>
</div>
</body>
</HTML>
